<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<script>
function iframeLoad(iframe){
	document.body.appendChild(document.createTextNode("IFRAME URL : "+iframe.location.href));
}
function addEvent(eventName,element,fn){
	if (element.attachEvent) element.attachEvent("on"+eventName,fn);
	else element.addEventListener(eventName,fn,false);
}
window.onload = function (){
	var iframe = document.createElement('iframe');
	addEvent("load",iframe,function (){iframeLoad(iframe.contentWindow)});
	document.body.appendChild(iframe);
}
</script>
</body>
</html>